package code.work1;
//按照要求定义Manager类,属性要私有,生成空参、有参构造，setter和getter方法

public class Coder {
    //创建私有成员变量
    private String name;
    private int id;
    private int salary;

    //提供构造方法
    public Coder() {
    }
    public Coder(String name, int id, int salary) {
        this.name = name;
        this.id = id;
        this.salary = salary;
    }

    //创建成员方法work
    public void work(){
        System.out.println("工号为"+getId()+"工资为"+getSalary()+"的程序员"+getName()+"正在努力的写着代码...操作步骤描述...");
    }

    //提供公有的get和set方法
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public int getId() {
        return id;
    }
    public void setId(int id) {
        this.id = id;
    }
    public int getSalary() {
        return salary;
    }
    public void setSalary(int salary) {
        this.salary = salary;
    }

}
